package net.sky.oa.test.dao.system;

import java.util.List;

import javax.annotation.Resource;

import net.sky.oa.dao.system.SysEmployeeDao;
import net.sky.oa.model.SysEmployee;
import net.sky.oa.test.BaseTestCase;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

public class SysEmployeeDaoTestCase extends BaseTestCase {

	@Resource
	private SysEmployeeDao sysEmployeeDao;

	@Test
	@Rollback(false)
	public void add() {
		SysEmployee sysEmployee = new SysEmployee();
		sysEmployee.setName("EmplName");
		sysEmployee.setMobile("13537720409");
		sysEmployee.setQq("345344719");
		sysEmployee.setUsername("hond");
		this.sysEmployeeDao.save(sysEmployee);
	}

	@Test
	@Rollback(false)
	public void find() {

		List<SysEmployee> employees = this.sysEmployeeDao.findAllEmployee();
		for (SysEmployee employee : employees) {
			System.out.println("getName:" + employee.getName());
		}
	}
}